# Maintainer: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>
 
pkgname=graphene
pkgver=1.8.2
pkgrel=1
pkgdesc="A thin layer of graphic data types"
url="https://github.com/ebassi/graphene"
arch=(x86_64)
license=(MIT)
depends=(glib2)
makedepends=(git gtk-doc gobject-introspection meson)
_commit=f98e3c378414eafae8b75792ded7496b09baaad9  # tags/1.8.2^0
source=("git+https://github.com/ebassi/graphene#commit=$_commit")
sha256sums=('SKIP')

pkgver() {
  cd $pkgname
  git describe --tags | sed 's/-/+/g'
}

prepare() {
  cd $pkgname
}

build() {
  arch-meson $pkgname build -D gtk_doc=true
  ninja -C build
}

check() {
  cd build
  meson test
}

package() {
  DESTDIR="$pkgdir" ninja -C build install
  install -Dt "$pkgdir/usr/share/licenses/$pkgname" -m644 $pkgname/LICENSE
  rm -r "$pkgdir"/usr/{lib,share}/installed-tests
}
